// Client.h: interface for the Client class.
//
//////////////////////////////////////////////////////////////////////

#if !defined(AFX_CLIENT_H__95CF8589_FB76_4D22_95DB_955DE49AB904__INCLUDED_)
#define AFX_CLIENT_H__95CF8589_FB76_4D22_95DB_955DE49AB904__INCLUDED_

#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000

#include "MonitoringUnitLib\CoalMineUnitManager.h"

struct RealtimeRecord;
class RealtimeRecordManager;
class BaseMonitoringUnit;

class Client : public CoalMineUnitManager
{
protected:
	Client();
	virtual ~Client();

public:
	static Client * Instance();
  static void DeleteInstance();

  void Init();
  void Cleanup();

  RealtimeRecordManager * NewRealtimeRecordManager(long nCoalMineId, const CString& strMonUnitId);
  RealtimeRecordManager * GetRealtimeRecordManagerById(long nCoalMineId, const CString& strMonUnitId);
  void AppendRealtimeRecord(RealtimeRecordManager * pRealtimeRecordMgr, long nCoalMineId, const CString& strMonUnitId);
  void AppendRealtimeRecord(RealtimeRecordManager * pRealtimeRecordMgr, BaseMonitoringUnit * pMonitoringUnit);

protected:
  void AddRealtimeRecordManager(RealtimeRecordManager * pRealtimeRecordMgr);
  void DeleteAllRealtimeRecordManager();

protected:
  std::vector<RealtimeRecordManager *> m_RTRecordMgrs;

private:
  static Client * m_pInstance;
};

#endif // !defined(AFX_CLIENT_H__95CF8589_FB76_4D22_95DB_955DE49AB904__INCLUDED_)
